﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web.Optimization;
using Enferno.Public.Web.Bundling;

namespace Enferno.Public.Web.Product
{
    public class ProductBundler : BundlerBase
    {
        public ProductBundler() : base("~/ProductBundle") {}
        public ProductBundler(string bundlePath): base(bundlePath) {}

        protected override Bundle SetupBundle(Bundle bundle)
        {
            if (Debug)
            {
                bundle.Include(new[]
                {
                    "~/jquery-{version}-js",
                    "~/Scripts/linq.js",
                    "~/Scripts/collections.js",
                    "~/Scripts/Product/Product.js",
                    "~/Scripts/knockout-{version}.debug.js",
                    "~/Scripts/knockout.mapping-latest.debug.js"
                });
            }
            else
            {
                bundle.Include(new[]
                {
                    "~/jquery-{version}-js",
                    "~/Scripts/linq.js",
                    "~/Scripts/collections.js",
                    "~/Scripts/Product/Product.js",
                    "~/Scripts/knockout-{version}.js",
                    "~/Scripts/knockout.mapping-latest.js"
                });
            }

            return bundle;
        }
    }
}
